<%@ page import="com.yyge.service.GoodsInfoService" %>
<%@ page import="com.yyge.service.impl.GoodsInfoServiceImpl" %>
<%@ page import="com.yyge.dto.GoodsInfoDto" %>
<%@ page import="com.yyge.vo.PageVo" %>
<%@ page import="com.yyge.vo.R" %>
<%@ page import="java.util.List" %>
<%@ page import="com.yyge.entity.GoodsInfo" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/5/9
  Time: 18:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <mata charset="UTF-8"/>
    <title>Title</title>
    <%
        //先调用GoodsService的业务逻辑层获取分页查询的数据
        GoodsInfoService service=new GoodsInfoServiceImpl();
        GoodsInfoDto dto = new GoodsInfoDto();
        dto.setPageNum(1);
        dto.setPageSize(10);

        R<PageVo> pageVoR=service.selectAll(dto);
        PageVo pageVo=(PageVo) pageVoR.getData();
        Long total=pageVo.getTotal();
        List<GoodsInfo> list=(List<GoodsInfo>) pageVoR.getData();
        System.out.println(list.size());
       // el表达式只能从4大作用域中取数据
        pageContext.setAttribute("list", list);
    %>
</head>
<body>

</body>
</html>
